
from flask import Blueprint
from flask_restful import Api
from comment.utils.output import output_json



user_bp = Blueprint('user',__name__,url_prefix='/user')

user_api = Api(user_bp)

#使用定制好的 返回到前端的json格式

user_api.representation('application/json')(output_json)


#加载当前蓝图中的所有资源
from financial.resources.user.user_resource import *
user_api.add_resource(Login,'/login',endpoint='login')#登录的资源
user_api.add_resource(IsExistPhone,'/isExist',endpoint='isExist')#验证手机号
user_api.add_resource(Smscode,'/sms',endpoint='sms')#发送短信验证码
user_api.add_resource(RegisterUser,'/user-register',endpoint='register')#用户注册
user_api.add_resource(UserAvatar,'/user-avatar',endpoint='avatar')#用户头像上传

